package project.entity.vo;

import project.common.DateFormatUtiles;
import project.entity.po.User;

import java.text.SimpleDateFormat;
import java.time.LocalDateTime;

public class UserVO extends User {
    private String roleName;

    public UserVO(Integer id, String name, String password, LocalDateTime createTime, LocalDateTime updateTime, String roleName) {
        super(id, name, password, createTime, updateTime);
        this.roleName = roleName;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    @Override
    public String toString() {
        return "UserVO{" +
                "id='" + super.getId() + '\'' + "   " +
                "name='" + super.getName() + '\'' + "   " +
                "password='" + super.getPassword() + '\'' + "   " +
                "createTime='" + DateFormatUtiles.dateParse(super.getCreateTime()) + '\'' + "   " +
                "updateTime='" + DateFormatUtiles.dateParse(super.getUpdateTime()) + '\'' + "   " +
                "roleName='" + roleName + '\'' +
                '}';
    }
}
